<div class="rightcontent rc-bg-grey">
    <div class="rc-pagepadding">
        <div class=" rc-pannel ">
            <div class="rc-pannel-body layui-form rc-pagepadding">

                <div class="layui-form-item">
                    <label class="layui-form-label">用户名</label>
                    <div class="layui-input-block" style="padding-top: 5px;">

                        <?php echo $userinfo['username']; ?>
                    </div>
                </div>


                <div class="layui-form-item">
                    <label class="layui-form-label">手机</label>
                    <div class="layui-input-block" style="padding-top: 5px;">

                        <?php echo $userinfo['phone']; ?>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">邮箱</label>
                    <div class="layui-input-block" style="padding-top: 5px;">

                        <?php echo $userinfo['email']; ?>
                    </div>
                </div>


                <div class="layui-form-item">
                    <label class="layui-form-label">重置密码</label>
                    <div class="layui-input-block">

                        <input type="text" name="pwd" autocomplete="off" value="" lay-verify="required" class="layui-input" />
                    </div>
                </div>

                <div class="layui-form-item rc-margin-bottom0">
                    <div class="layui-input-block">
                        <button type="button" class="layui-btn layui-btn-primary layui-btn-sm" lay-submit lay-filter="submit">提交</button>

                    </div>
                </div>

            </div>
        </div>
    </div>
</div>

<script>
    layui.use(function() {

        var form = layui.form;
        form.on('submit(submit)', function(data) {
            var fielddata = data.field;

            $.ajax({
                url: '/admin/cnf/User/resetPwd?uid=<?php echo request()->get('uid') ?>', //请求路径
                type: "POST", //请求方式
                data: data.field, // 默认写法
                success: function(data) {
                    if (data.code == 0) {
                        toastr_success("重置成功", function() {
                            window.parent.location.reload();
                        });
                    } else {
                        toastr_error(data.message);
                    }
                },
                error: function() {

                },

            });
        });



    });
</script>